/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.menosehmais.model;

import br.com.menosehmais.framework.persistence.DomainObject;
import br.com.menosehmais.framework.persistence.IHaveCreationDateTime;
import br.com.menosehmais.framework.persistence.IHaveLastUpdate;
import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import org.joda.time.LocalDateTime;
import org.hibernate.annotations.Type;

/**
 *
 * Responsavel pela denuncia ao portlet
 * @author Junior JAFJ
 */
@Entity
@Table(name="snitch")
public class SnitchDO extends DomainObject implements IHaveCreationDateTime, IHaveLastUpdate {

    private String idPortlet;
    
    @ManyToOne
    private UsuarioDO conta;

    private boolean Snitch;

    @Column(updatable = false)
    @Type(type = "org.joda.time.contrib.hibernate.PersistentLocalDateTime")
    private LocalDateTime creationDateTime;

    @Type(type = "org.joda.time.contrib.hibernate.PersistentLocalDateTime")
    private LocalDateTime lastUpdate;

    public boolean getSnitch() {
        return Snitch;
    }

    public void setSnitch(boolean Snitch) {
        this.Snitch = Snitch;
    }

    public String getIdPortlet() {
        return idPortlet;
    }

    public void setIdPortlet(String idPortlet) {
        this.idPortlet = idPortlet;
    }

    public UsuarioDO getConta() {
        return conta;
    }

    public void setConta(UsuarioDO conta) {
        this.conta = conta;
    }

    @Override
    public LocalDateTime getCreationDateTime() {
        return creationDateTime;
    }

    @Override
    public void setCreationDateTime(LocalDateTime creationDateTime) {
        this.creationDateTime = creationDateTime;
    }

    @Override
    public void setLastUpdate(LocalDateTime lastUpdate) {
        this.lastUpdate = lastUpdate;
    }

    @Override
    public LocalDateTime getLastUpdate() {
        return lastUpdate;
    }    
}
